package com.future.prototype;

import java.util.List;

/**
 * Description:
 *
 * @author weiruibai.vendor
 * Date: 2021/11/16 14:24
 */
public class Teacher implements Cloneable {

    private int id;

    private String name;

    private Student students;

    private User user;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    @Override
    protected Teacher clone() throws CloneNotSupportedException {
        User clone = user.clone();
        Teacher teacher =  (Teacher) super.clone();
        teacher.setUser(clone);
        return teacher;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Student getStudents() {
        return students;
    }

    public void setStudents(Student students) {
        this.students = students;
    }

    @Override
    public String toString() {
        return "Teacher{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", students=" + students +
                ", user=" + user +
                '}';
    }
}
